   <div class="col-md-2 col-xs-height navshadow">
    <ul class="nav nav-sidebar" >
            <div class="image">
                <img src="<?php echo base_url("public/images/sidebar_logo.jpg"); ?>" alt="logo_image" width="150px" height="150px" class="img-circle">
                <h3>Trung tâm</h3>
            </div>
            <?php
            foreach ($type_of_center as $value) {
                ?>
                <li class="<?php if ($idType == $value['id_type_center']) echo 'center-active' ?>"><a href="<?php echo base_url('index.php/website/activity/load_by_type/' . $value['id_type_center']); ?>" ><?php echo $value['name_type']; ?></a>

                    <?php
                }
                ?>

        </ul>
    </div>
   
<div class="col-md-10 col-xs-height"> 
  <div class="row">
    <div class='col-md-7'>
          <div class="breadcrumbs" style="margin-top: 1%; margin-bottom: 1%;">
                <ul>
                    <li><a href="<?php echo base_url("index.php/home");?>"><span class="glyphicon glyphicon-home"></span> Trang chủ</a></li>
                    <li class="active"><a href="<?php echo base_url("index.php/website/activity");?>"><span class="glyphicon glyphicon-file"></span> Hoạt động</a></li>
                </ul>
          </div>  
    </div>
    <div class='col-md-5'>
          <div class="navbar-right">
             <?php echo $link; ?>
          </div>
    </div>
  </div>
    <div class="highlight">
        <?php if ($notice) :?>
        <div class="panel panel-body myshadow" style="margin-bottom: 0px;">
             <?=$notice?>
            </div>
        <?php else :?>
            <?php foreach ($activity as $row):
                
                //han che do dai
                if (strlen($row['name']) > 60) {
                    $name1 = substr($row['name'], 0, 60);

                    $row['name'] = substr($name1, 0, strrpos($name1, ' ')) . ' ...';
                }
                if (strlen($row['discription']) > 380) {
                    $discription = substr($row['discription'], 0, 380);
                    $row['discription'] = substr($discription, 0, strrpos($discription, ' ')) . ' ...';
                }
            
            ?>
                <div class="panel panel-body myshadow" style="margin-bottom: 15px;">
                    <div class="row">
                        <?php echo $notice?>
                        <h3><a href="<?=base_url('index.php/website/activity/load_by_id/'.$row['id_activity']);?>"><?=$row['name']?></a></h3>
                        <p class="text-muted" style="font-size: 12px;">Ngày bắt đầu: <?=date('H:i d/m/Y', strtotime($row['startday'])); echo "&nbsp&nbsp&nbsp&nbsp&nbsp";?> Ngày kết thúc: <?php echo date('H:i d/m/Y', strtotime($row['endday'])); ?> </p>
                        <p class="text-muted" style="font-size: 12px;">Số lượt xem <?php echo $row['view']; ?></p>
                    
                        <hr>
                    </div>
                    <div class="row">
                        <div class="col-md-3">
                          <a href="<?php echo base_url()."index.php/website/activity/load_by_id/".$row['id_activity']; ?>"><img src="
                          <?php   if (!file_exists($row['url_image'])){
                                    echo $row['url_image'];
                                  } 
                                  echo base_url($row['url_image']);
                          ?>" class="avatar_activity"></a>
                        </div>
                        <div class="col-md-9">
                          <p class="name"><?=$row['ct_name']?></p>
                          <!--<p class="company">HCM University of Technology</p>-->
                          <p class="email">Địa chỉ : <b class="text-danger"><?php echo $row['num'].' '.$row['street'].', '.$row['ward'].', '.$row['district']; ?></b></p>
                          
                        </div>
                        
                   
                    <hr>
                        <p>
                            <?=$row['discription'];?>
                        </p>
                    </div>
            </div>
            <?php endforeach;?>
        <?php endif;?>
        </div>
    </div>